package org.ecpkn.PAGridSim.core.gridsimEntity.paMachine;

import java.util.Comparator;

public class ComparatorMachineUtilization implements Comparator<PAMachine> {

	public int compare(PAMachine m0,PAMachine m1) {
		
		int flagUtilization = 0;
		int factor=10000;
		double u0 = m0.getMachinesUtilization();
		double u1 = m1.getMachinesUtilization();
		flagUtilization = (int) (u0*factor-u1*factor);
			return flagUtilization;
		}
}
